<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>8.事件处理</title>
    </head>
    <body>
        <div id="root"></div>
      <script src="./lib/react.development.js"></script>
      <script src="./lib/react-dom.development.js"></script>
      <script src="./lib/babel.js"></script>

      <!-- 事件名采用小驼峰 里面嵌套回调函数 -->
      <script type="text/babel">

        const handleClick = () => {
            
        }

        const element =
        <div className='box'
             onMouseMove = {() => {
                console.log('move了');
             }}>
            <button onClick={handleClick}>按钮</button>
        </div>

        ReactDOM.createRoot(document.getElementById('root')).render(element);
      </script>
    </body>
</html>